export {}
/**
 * 当我们写一个类的时候，会得到2个类型
 * 1.构造函数类型的函数类型
 * 2.类的实例类型
 */
namespace a{
	class Component {
		static myName:string = '静态名称属性';
		myName:string = '实例名称属性'
	}
	//Component 类名本身表示是实例的类型
	let c :Component = new Component()
	// ts :后面是类型，= 后面是值
	let f: typeof Component = Component 
}

namespace b{
	function Component(this: any){
		this.myName ='实例名称属性'
	}
	let com = Component;
	Component.myName = '静态名称实例';let f:typeof Component = com
}

class Animal {
	constructor(public name:string){

	}
}

// 普通函数
interface WithNameClass{
	(name:string):any
}

let wc:WithNameClass = ( name:string) => {
	
}

// 加上new之后就是用来描述类的构造函数
interface WithNameClass2{
	new(name:string):any
}

let wc2:WithNameClass2 = Animal

interface Type1{
	(name:string):any
	age:number
}
interface Type2{
	a:(name:string)=>any
}
let t:any =  (name:string) =>{}
t.age =10
let t1:Type1 =t
let t2:Type2 = {
	a:t1
}